Skip to content

Keep native Inbox delegation reads complete across host budgets - #9204

Open
loopx-agent wants to merge 1 commit into
mainfrom
codex/inbox-integrated-native-read-20261121
Open

loopx-agent wants to merge 1 commit into
mainfrom
codex/inbox-integrated-native-read-20261121

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Goal and delivered outcome

A managed Turn can read outstanding delegations through the existing Inbox, including the latest verified partial result and pending work. Readers can page through full incoming briefs, partial summaries, and outstanding sent requests. The Inbox checks each exact request and operation cursor against its registered scope. If the sent request record is unavailable on the final page, the response exposes the unavailable count.

This integrates the changes from #9169 and #9195 with the host reader declaration already on main in #9095.

Author Declaration

Written by model_agent · GPT-6 · OpenAI.

Requirement Disposition Validation
Restore unfinished request context before work Implemented in the existing scoped Inbox transaction Two actual native Codex Turns per run read complete briefs through fresh reads and cursor continuation. The CLI tests cover the combined operation and request cursors.
Keep uncertain returns and incomplete reads actionable The Inbox verifies request and result identity before compacting a partial result. It reports missing source records on the final attention page. TypeScript and Python regressions cover unbound receipts, unreadable operations, exact lookup, and denial across Agents.
Keep Markdown Inbox data within the caller's usable budget The opening and default fallback use 5,000 serialized bytes. The declared profile uses up to 64,000 bytes for captured continuations. The actual Codex tool stream retained every page under both profiles. The compact reference and direct recovery use the same capture digest and cursors.
Verify the installed Desktop and Feishu journey Pending The isolated wheel includes the Chat bundle and exercises the installed CLI. The live Desktop and Feishu paths still need their original acceptance checks.

Required work context and operator Inbox contract

Validation

Tested candidate de5a83d4d533571f3d8b1b38da7178087cfda82c against main d772190747d6d39d7f896ea37a52d518d257e571.

The same UTF-8 workload was run with Codex app-server 0.171.0-alpha.13 over stdio, with isolated File and SQLite stores and loopback fixture inference. Each run recovered all 24 original briefs. Reader call counts include same-capture retries and exclude the Inbox openings.

Reader profile Main reader calls Candidate reader calls Main truncation recoveries Candidate truncation recoveries
Default shell 47 44 3 0
Declared 64 KB 5 5 0 0

Each backend produced the same call counts. The candidate's default reader responses were at most 4,999 serialized bytes. The same cursor failed across Agents with no receipt writes. The package included the verified Chat bundle and the candidate was installed into a separate test environment.

  • 75 Python tests passed. Two PowerShell cases were skipped on macOS.
  • 26 TypeScript Inbox tests passed. Control-plane type checking, Ruff, and the RFC bilingual diff check passed.
  • The new terminal-page test reproduced the missing unavailable count before the fix and passed on the candidate.
  • The standard premerge gate passed 6 direct checks and 18 selected checks. The current diff passed the change-quality receipt check.

Hosted checks

The inspected release and Chat browser jobs stopped at the shared ExecutionObservationReadback assertion. The fix is already on main in #9210. Release browser job · Chat browser job

Windows reported WinError 10038 while the shared canonical fixture waited for its subprocess pipe. #9218 addresses this fixture failure and awaits native Windows CI. Windows job

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

托管 Agent 需要在执行前发现未完成委派和回执异常,并按实际工具容量读全请求。 未明确声明的 shell 可能截断页。单独使用 #9195 的固定 reader 预算会把已声明的大页路径降为小页。 原先 #9169 的候选实现,在外发记录只剩一条不可读、且没有下一页时,首次注意视图没有发出恢复计数。当前头在完全相同的 TypeScript 事务测试返回 unavailable_count=1,普通 Inbox 仍保留原输出。 当前提案把默认 Markdown 开场和保底 reader 限在 5,000 字节。明确声明的 64,000 字节继续经现有 capture reader 使用。注意视图终页同时携带不可读记录的异常数。 独立验证采用真实 File/SQLite 源码 CLI 和类型化事务。官方 Desktop、实时 Feishu 及 Windows 仍未在本轮复验。

改动思路 / Approach

在 Inbox 的现有 TypeScript 事务中处理摘要、精确送达和末页恢复状态。在 Markdown 适配器组合保底上限与已声明的 reader 容量。 工作摘要与完整请求继续共享原始回执与游标;读取分页沿用原执行权限。 复用 #9095 既有声明和同一不可变 capture,通过两条预算路径保全不同宿主的读取合同。

具体改动 / Changes

准确头 de5a83d,merge base d772190,13 个文件,+561/-108。当前主干 a6ffb3b 的整合预演无冲突,合并树独立通过 7 项聚焦回归。原候选的末页异常路径另用同一断言与 #9169 对照。 预算契约 按修订 de5a83d 的仓库规范核对各项要求。 目标规范

  • attention-receipt · Preserve full requests unless the exact current partial result is delivered.
  • terminal-unavailable · Report unavailable records including on a terminal attention page.
  • profile-parity · Bound fallback responses while preserving the qualified declared reader and exact digest recovery.

关键代码讲解

对主干的风险 / Risks

本头实跑 75 项 Python(2 项 PowerShell 跳过)、87 项 TypeScript 和本地 quick premerge。File 和 SQLite 的已声明 64,000 字节输入均在 5 次 reader 调用内读完 23 条请求和两张逻辑页。默认 5,000 字节分支验证开场、摘要恢复、续读偏移及整页回读。 终页反例在 #9169 缺少 unavailable_count,在本头通过。精确结果旧回执与错误绑定保持全文并可区分恢复,另一 Agent 的请求游标被拒绝,外发续页不追加交付或消费。 File/SQLite 发起同一实际生成的命令,在 5,000 字节和声明 64,000 字节两支均完整重建源数据。修过的末页断言独立通过。 此次验证不是正式安装版 App 或实时飞书的采用凭据。涉及更宽的工作流验收时应继续保留这两项实际入口的证据需求。

我的整体评价 / Verdict

批准当前准确头。默认小窗、声明大窗与外发末页恢复在同一个实现入口通过测试。精确请求来源和回执消费仍由既有流程负责。可用这一个准确头承接两项早期候选的集成验收。

English verdict: APPROVE at de5a83d. Approve this exact head. It preserves the existing declared 64 KB capture route and bounds the default Inbox reads at 5 KB. The same terminal-page witness fails on the earlier proposal and passes here, and seven focused tests pass on a clean current-main integration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant